<div class="box">
    <h4 class="white">Edit a project</h4>
    <div class="box-container">
        <form action="/project/edit/<?php echo $id ?>" method="post" class="middle-forms" id="project-form" name="project-form">
            <h3><?php echo "Edit project detail"; ?></h3>
            <p>Please complete the form below. Mandatory fields marked <em>*</em></p>
            <?php echo isset($message) ? '<span class="form-confirm-inline">' . $message . '</span>' : ""; ?>
            <fieldset>
                <legend>Fieldset Title</legend>
                <ol>
                    <li class="even">
                        <label class="field-title">Project Name <em>*</em>:</label> 
                        <label><input class="txtbox-long required" value="<?php echo $project->name ?>" name="name"/></label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li>
                        <label class="field-title">Code <em>*</em>:</label> 
                        <label><input class="txtbox-long required" value="<?php echo $project->code ?>" name="code"/></label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li class="even">
                        <label class="field-title">SVN URL <em>*</em>:</label> 
                        <label><input class="txtbox-long required url" value="<?php echo $project->svn_url ?>" name="svn_url"/></label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li>
                        <label class="field-title">Project Leader <em>*</em>:</label> 
                        <label>
                            <?php
                            if (Auth::instance()->logged_in('admin'))
                                echo Form::select('projectleader', $projectleaders, "$projectleaderid", array('class' => "form-select"));
                            else {
                                echo "<input type='hidden' name='projectleader' value=$projectleaderid>";
                                echo "<a href='/user/profile/$projectleaderid'>".ORM::factory('user')->where('id','=',$projectleaderid)->find()->username."</a>";
                            }
                            ?>
                        </label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li class="even">
                        <label class="field-title">Host IP <em>*</em>:</label> 
                        <label><input class="txtbox-long required" value="<?php echo $project->host_ip ?>" name="host_ip"/></label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li>
                        <label class="field-title">Host Acc <em>*</em>:</label> 
                        <label><input class="txtbox-long" value="<?php echo $project->host_acc ?>" name="host_acc"/></label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li class="even">
                        <label class="field-title">Host Password <em>*</em>:</label> 
                        <label><input class="txtbox-long" type="password" name="host_pass"/></label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li>
                        <label class="field-title">DB Acc <em>*</em>:</label> 
                        <label><input class="txtbox-long" value="<?php echo $project->db_acc ?>" name="db_acc"/></label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li class="even">
                        <label class="field-title">DB Password <em>*</em>:</label> 
                        <label><input class="txtbox-long" type="password" name="db_pass"/></label>
                        <span class="clearFix">&nbsp;</span>
                    </li>
                    <li>
                        <label><input type="checkbox" checked value="" name="isActive"/>Is Active?</label>
                    </li>
                </ol><!-- end of form elements -->
            </fieldset>
            <div class="align-left inner-nav" style="width:100px; float: left">
                <span class="sb"><input type="submit" name="update" value="Update"/></span>
            </div><span class="clearFix">&nbsp;</span>
            <span class="clearFix">&nbsp;</span>
        </form>
    </div>
</div>